/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.fii.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Zeus
 */
@Embeddable
public class PgDetalleGruposPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "pg_codGrupo", nullable = false, length = 2)
    private String pgcodGrupo;
    @Basic(optional = false)
    @Column(name = "pg_dia", nullable = false)
    private char pgDia;

    public PgDetalleGruposPK() {
    }

    public PgDetalleGruposPK(String pgcodGrupo, char pgDia) {
        this.pgcodGrupo = pgcodGrupo;
        this.pgDia = pgDia;
    }

    public String getPgcodGrupo() {
        return pgcodGrupo;
    }

    public void setPgcodGrupo(String pgcodGrupo) {
        this.pgcodGrupo = pgcodGrupo;
    }

    public char getPgDia() {
        return pgDia;
    }

    public void setPgDia(char pgDia) {
        this.pgDia = pgDia;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pgcodGrupo != null ? pgcodGrupo.hashCode() : 0);
        hash += (int) pgDia;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PgDetalleGruposPK)) {
            return false;
        }
        PgDetalleGruposPK other = (PgDetalleGruposPK) object;
        if ((this.pgcodGrupo == null && other.pgcodGrupo != null) || (this.pgcodGrupo != null && !this.pgcodGrupo.equals(other.pgcodGrupo))) {
            return false;
        }
        if (this.pgDia != other.pgDia) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.fii.entity.PgDetalleGruposPK[ pgcodGrupo=" + pgcodGrupo + ", pgDia=" + pgDia + " ]";
    }
    
}
